﻿using System;
using System.Net;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PushTest.API.Response
{
    [DataContract]
    public class BaseResponse : G.SL.Net.APISuite.IResponse
    {

        private string body;
        /// <summary>
        /// 响应原始内容
        /// </summary>
        public string Body
        {
            get
            {
                return body;
            }
            set
            {
                //非调试状态下没必要存储
                if (System.Diagnostics.Debugger.IsAttached)
                    this.body = value;
            }
        }

        public Exception Exception
        {
            get;
            set;
        }

        [DataMember(Name = "IsOK")]
        public bool IsOK { get; set; }

        [DataMember(Name = "Msg")]
        public string Msg { get; set; }

    }

    [DataContract]
    public class BaseResponse<T> : BaseResponse
    {
        [DataMember(Name = "ResponseData")]
        public T ResponseData { get; set; }
    }
}
